package 同步不具有继承性;

public class Main {
	synchronized public void serviceMethod() {
		try {
			System.out.println("int main 下一步sleep begin threadName="+Thread.currentThread().getName()+" tim= "+
		System.currentTimeMillis());
			Thread.sleep(5000);
			System.out.println("int main 下一步 sleep end threadName="+Thread.currentThread().getName()+" time="+
					System.currentTimeMillis());
		}
		
		catch(InterruptedException e) {
			e.printStackTrace();
		}
		
	}

}
